<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj = {};
        let func = function(){

        }

        let proxy = new Proxy(obj, {
            get(target, key, receiver){
                console.log(`get拦截 ${key}`);
            },
            set(target, key, value, receiver){
                console.log(`set拦截 ${key}`);
            },
            has(target, propKey){
                console.log(`has拦截`);
            },
            deleteProperty(target, propKey){
                console.log(`deleteProperty拦截`);
            },
            ownKeys(target){
                console.log('ownKeys拦截');
            },
            getOwnPropertyDescriptor(target, propKey){
                console.log('getOwnPropertyDescriptor拦截');
            },
            defineProperty(target, propKey, propDesc){
                console.log('defineProperty拦截');
            },
            getPrototypeOf(target){
                console.log('target拦截');
            },
            setPrototypeOf(target, proto){
                console.log('setPrototypeOf拦截');
            },
            apply(target, object, args){
                console.log('apply拦截');
            },
            construct(target, args){
                console.log('construct拦截');
            },
            isExtensible(target){
                console.log('isExtensible拦截');
            },
            preventExtensions(target){
                console.log('preventExtensions拦截');
            }

        });
    </script>
</body>
</html>